<div ng-init="query_event.init();" class="kmi-layout-content QT05-query-page">
    <div class="kmi-header-row">
        <button class="back-btn" ng-click="query_event.back();" ng-if="query_event.isSearched(main_event.bom_query_setting)">
            <img src='image/smes_v340/W_Com_DropLeft_nor_32.png'></img>
        </button>
        <div class="header-title" ng-bind="'QT_standard.common.filterCondition.title' | translate"></div>
    </div>
    <div class="kmi-layout-main-content">
        <div class="kmi-layout-page">
            <div class="kmi-text-fields conditoin-fields" > 
                <input ng-click="query_event.loadCodeList(query_event.select_label_item)" ng-model="query_event.select_label_item.label" class="column_name ng-pristine ng-valid ng-not-empty ng-touched" type="text" readonly="readonly">
                <div class="tip"><i class="material-icons">&#xE5CF;</i></div>
                <input ng-if="query_event.select_label_item.l_type != 'date'"  ng-click="query_event.loadTypeList(query_event.select_type_item)" ng-model="query_event.select_type_item.label" class="query_mode ng-pristine ng-valid ng-not-empty ng-touched" type="text" readonly="readonly">
                <div   ng-if="query_event.select_label_item.l_type != 'date'" class="tip"><i class="material-icons">&#xE5CF;</i></div>
                <input ng-if="query_event.select_label_item.l_type != 'date'" class="column_value ng-pristine ng-valid ng-not-empty ng-touched" ng-model="query_event.select_txt_vale" type="text">
                <input ng-if="query_event.select_label_item.l_type == 'date'" mdl-datepicker="query_event.select_date_vale.start_time"  style="margin-right: 16px;" mdl-date-max="query_event.select_date_vale.end_time" placeholder=""></input>
                <div   ng-if="query_event.select_label_item.l_type == 'date'" class="tip"  style="right: 10px; color: #000000;">~</div>
                <input ng-if="query_event.select_label_item.l_type == 'date'" mdl-datepicker="query_event.select_date_vale.end_time"  style="margin-left: 8px;" mdl-date-min="query_event.select_date_vale.start_time" placeholder=""></input>
                <button ng-click="query_event.addCondition()" class="mdl-button mdl-js-button mdl-button--icon mdl-button--icon_prime">
                    <img src="image/icons/add.png">
                </button>
            </div>
            <div class="condition-panel" ng-if="query_event.condition.length > 0" class="kmi-text-fields" >
                <div class="condition-content perfect-scrollbar" suppress-scroll-x="false">
                    <div ng-click="query_event.removeConditionItem(condition,$index)"  ng-repeat="condition in query_event.condition track by $index" class="condition ng-scope">
                        <button class="mdl-button mdl-button--icon">
                            <i class="material-icons">&#xE5CF;</i>
                        </button>
                        <label class="ng-binding" ng-bind="condition.label_name"></label>
                        <label class="ng-binding">｜</label>
                        <label class="ng-binding" ng-bind="condition.query_name"></label>
                        <label class="ng-binding">｜</label>
                        <label class="ng-binding" ng-bind="condition.value_txt"></label>
                        <div class="kmi-can-click"></div>
                    </div>
                </div>
            </div>
            <div class="kmi-list column-selector" column-selector-id="query-page">
                <div class="kmi-list__header">
                    <div class="kmi-list__column" style="flex: 0 0 50px;"></div>
                    <div class="kmi-list__column" style="flex: 0 0 190px;" ng-bind="'QT05.filter_result.ITEM_CODE' | translate"></div>
                    <div class="kmi-list__column" style="flex: 0 0 190px;" ng-bind="'QT05.filter_result.ITEM_NAME' | translate"></div>
                    <div class="kmi-list__column" style="flex: 0 0 190px;" ng-bind="'QT05.filter_result.ITEM_SPEC' | translate"></div>
                    <div class="kmi-list__column" style="flex: 0 0 190px;" ng-bind="'QT05.filter_result.LOTNO' | translate"></div>
                    <div class="kmi-list__column" style="flex: 0 0 190px;" ng-bind="'QT05.filter_result.LOT_CODE' | translate"></div>
                </div>
                <div class="kmi-list__row-content">
                    <div class="kmi-list__row"  ng-class="{'is-select':setting_item.is_select}"  ng-repeat="setting_item in query_event.getPages(query_event.query_setting_detail, query_event.PageConfig) track by $index">
                        <div class="kmi-list__column column-border">
                            <div class="div-circle"></div>
                        </div>
                        <div class="kmi-list__column column-border" ng-bind="setting_item.item_code"></div>
                        <div class="kmi-list__column column-border" ng-bind="setting_item.item_name"></div>
                        <div class="kmi-list__column column-border" ng-bind="setting_item.item_spec"></div>
                        <div class="kmi-list__column column-border" ng-bind="setting_item.lot_no"></div>
                        <div class="kmi-list__column column-border" ng-bind="setting_item.lot_code"></div>
                        <div class="kmi-can-click" ng-click="query_event.clickQueryItem(setting_item)"></div>
                    </div>
                </div>
            </div>
            <div class="query-layout-footer">
                
                <div class="page-content">
                    <div class="page-icon">
                        <img src="image/icons/dropleft.png"></img>
                        <div class="kmi-can-click" ng-click="query_event.PageConfig.page = (query_event.PageConfig.page-1<0?0:query_event.PageConfig.page-1);"></div>
                    </div>
                    <label ng-bind="(query_event.PageConfig.page +1)+' / '+query_event.PageConfig.total_page"></label>
                    <div class="page-icon">
                        <img src="image/icons/dropright.png"></img>
                        <div class="kmi-can-click" ng-click="query_event.PageConfig.page = (query_event.PageConfig.page+1>(query_event.PageConfig.total_page-1)?(query_event.PageConfig.total_page-1):query_event.PageConfig.page+1);"></div>
                    </div>
                </div>
                <div class="kmi-button kmi-button-confrim" ng-disabled="query_event.isConfirmBtnDisabled();">
                    <label class="ng-binding" ng-bind="'common.btn.confirm'|translate"></label>
                    <div class="kmi-can-click" ng-click="query_event.confirm()"></div>
                </div>
            </div>
        </div>
    </div>
</div>